$(function(){

	$('#phone').mask('(999) 999-9999');
	
	$('#zip').mask('99999');
	
	$('#registration').validate({
		rules: {
			email: {
				required: true,
				email: true
			},
			re_enter_email: {
				required: true,
				email: true,
				equalTo: "#email"
			},
			password: {
				required: true
			},
			re_enter_password: {
				required: true,
				equalTo: "#password"
			},

			first_name: "required",
			last_name: "required",
			country: "required",
			tos: "required"
			
		},
		messages: {
			firstname: "Please enter your firstname",
			lastname: "Please enter your lastname",
			username: {
				required: "Please enter a username",
				minlength: "Your username must consist of at least 2 characters"
			},
			password: {
				required: "Please provide a password",
				minlength: "Your password must be at least 5 characters long"
			},
			confirm_password: {
				required: "Please provide a password",
				minlength: "Your password must be at least 5 characters long",
				equalTo: "Please enter the same password as above"
			},
			email: "Please enter a valid email address",
			agree: "Please accept our policy"
		}
			
	});

	
//   MAIN	
});